<?php

if (isset($_GET["week"]))
{
	$QUERY = "
		SELECT dag, uur, id 
		FROM studieuur 
		WHERE week = '" . $_GET["week"] . "'";
	$resultuurnr = mysql_query($QUERY);
?>
					<table align="center">
						<tr>
<?php for($i = 0; $i < mysql_num_rows($resultuurnr); $i++) { 
?>							<td><a id="su_<?php print(mysql_result($resultuurnr, $i, "id"));?>" onclick="gethours('<?php print(mysql_result($resultuurnr, $i, "id")); ?>')" href="#" class="wk_button"><?php print(mysql_result($resultuurnr, $i, "dag") . mysql_result($resultuurnr, $i, "uur"));?></a></td>
<?php if ($i%4 == 0 && $i > 0) {
?>						</tr>
						<tr>
<?php } } 
?>						</tr>
					</table>
					<table align="right">
						<tr>
							<td><a onclick="addentirehour();" class="actionbutton"><img src="pics/addweek.png" /></a></td>
							<td><a onclick="delentirehour();" class="actionbutton"><img src="pics/delweek.png" /></a></td>
						</tr>
					</table>
				<?php
}

?>